import Vue from 'vue'
//引入elementui
//自定义主题颜色
import '../theme/index.css'
//默认 import 'element-ui/lib/theme-chalk/index.css';
import ElementUI from 'element-ui';
import App from './App'
import router from './router'
//引入axios
import api from './api/index.js'

Vue.prototype.$api = api

Vue.config.productionTip = false

Vue.use(ElementUI);

const vm=new Vue({
  router,
  data: {
    currentRoute: window.location.pathname
  },
  // computed: {
  //   ViewComponent () {
  //     return router[this.currentRoute]
  //   }
  // },
  render (h) { return h(App) }
}).$mount('#app')

// window.addEventListener('popstate', () => {
//   app.currentRoute = window.location.pathname
// })